home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / Video.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  25.1 KB  |  549 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Video.a
  3. ;
  4. ;    Contains:    Video Driver Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__VIDEO__') = 'UNDEFINED' THEN
  21. __VIDEO__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30. ;        include 'QuickdrawText.a'                                    ;
  31.  
  32. mBaseOffset                        EQU        1                    ;Id of mBaseOffset.
  33. mRowBytes                        EQU        2                    ;Video sResource parameter Id's 
  34. mBounds                            EQU        3                    ;Video sResource parameter Id's 
  35. mVersion                        EQU        4                    ;Video sResource parameter Id's 
  36. mHRes                            EQU        5                    ;Video sResource parameter Id's 
  37. mVRes                            EQU        6                    ;Video sResource parameter Id's 
  38. mPixelType                        EQU        7                    ;Video sResource parameter Id's 
  39. mPixelSize                        EQU        8                    ;Video sResource parameter Id's 
  40. mCmpCount                        EQU        9                    ;Video sResource parameter Id's 
  41. mCmpSize                        EQU        10                    ;Video sResource parameter Id's 
  42. mPlaneBytes                        EQU        11                    ;Video sResource parameter Id's 
  43. mVertRefRate                    EQU        14                    ;Video sResource parameter Id's 
  44. mVidParams                        EQU        1                    ;Video parameter block id.
  45. mTable                            EQU        2                    ;Offset to the table.
  46. mPageCnt                        EQU        3                    ;Number of pages
  47. mDevType                        EQU        4                    ;Device Type
  48. oneBitMode                        EQU        128                    ;Id of OneBitMode Parameter list.
  49. twoBitMode                        EQU        129                    ;Id of TwoBitMode Parameter list.
  50. fourBitMode                        EQU        130                    ;Id of FourBitMode Parameter list.
  51. eightBitMode                    EQU        131                    ;Id of EightBitMode Parameter list.
  52.  
  53. sixteenBitMode                    EQU        132                    ;Id of SixteenBitMode Parameter list.
  54. thirtyTwoBitMode                EQU        133                    ;Id of ThirtyTwoBitMode Parameter list.
  55. firstVidMode                    EQU        128                    ;The new, better way to do the above. 
  56. secondVidMode                    EQU        129                    ; QuickDraw only supports six video 
  57. thirdVidMode                    EQU        130                    ; at this time.      
  58. fourthVidMode                    EQU        131
  59. fifthVidMode                    EQU        132
  60. sixthVidMode                    EQU        133
  61. spGammaDir                        EQU        64
  62. spVidNamesDir                    EQU        65
  63.  
  64. ; csTimingFormat values in VDTimingInfo 
  65. ; look in the declaration rom for timing info 
  66. kDeclROMtables                    EQU        'decl'
  67.  
  68. ; Timing mode constants for Display Manager MultiMode support
  69. ;    Corresponding    .h equates are in Video.h
  70. ;                    .a equates are in Video.a
  71. ;                    .r equates are in DepVideoEqu.r
  72. ;
  73. timingInvalid                    EQU        0                    ; Unknown timing… force user to confirm.
  74. timingApple12                    EQU        130                    ;  512x384 (60 Hz) Rubik timing.
  75. timingApple12x                    EQU        135                    ;  560x384 (60 Hz) Rubik-560 timing.
  76. timingApple13                    EQU        140                    ;  640x480 (67 Hz) HR timing.
  77. timingApple13x                    EQU        145                    ;  640x400 (67 Hz) HR-400 timing.
  78. timingAppleVGA                    EQU        150                    ;  640x480 (60 Hz) VGA timing.
  79. timingApple15                    EQU        160                    ;  640x870 (75 Hz) FPD timing.
  80. timingApple15x                    EQU        165                    ;  640x818 (75 Hz) FPD-818 timing.
  81. timingApple16                    EQU        170                    ;  832x624 (75 Hz) GoldFish timing.
  82. timingAppleSVGA                    EQU        180                    ;  800x600 (56 Hz) SVGA timing.
  83. timingApple1Ka                    EQU        190                    ; 1024x768 (60 Hz) VESA 1K-60Hz timing.
  84. timingApple1Kb                    EQU        200                    ; 1024x768 (70 Hz) VESA 1K-70Hz timing.
  85. timingApple19                    EQU        210                    ; 1024x768 (75 Hz) Apple 19" RGB.
  86. timingApple21                    EQU        220                    ; 1152x870 (75 Hz) Apple 21" RGB.
  87. timingAppleNTSC_ST                EQU        230                    ;  512x384 (60 Hz, interlaced, non-convolved).
  88. timingAppleNTSC_FF                EQU        232                    ;  640x480 (60 Hz, interlaced, non-convolved).
  89. timingAppleNTSC_STconv            EQU        234                    ;  512x384 (60 Hz, interlaced, convolved).
  90. timingAppleNTSC_FFconv            EQU        236                    ;  640x480 (60 Hz, interlaced, convolved).
  91. timingApplePAL_ST                EQU        238                    ;  640x480 (50 Hz, interlaced, non-convolved).
  92. timingApplePAL_FF                EQU        240                    ;  768x576 (50 Hz, interlaced, non-convolved).
  93. timingApplePAL_STconv            EQU        242                    ;  640x480 (50 Hz, interlaced, non-convolved).
  94. timingApplePAL_FFconv            EQU        244                    ;  768x576 (50 Hz, interlaced, non-convolved).
  95.  
  96. ; csConnectFlags values in VDDisplayConnectInfo 
  97. kAllModesValid                    EQU        0                    ; All modes not trimmed by primary init are good close enough to try 
  98. kAllModesSafe                    EQU        1                    ; All modes not trimmed by primary init are know to be safe 
  99. kReportsTagging                    EQU        2                    ; Can detect tagged displays (to identify smart monitors) 
  100. kHasDirectConnection            EQU        3                    ; True implies that driver can talk directly to device (e.g. serial data link via sense lines) 
  101. kIsMonoDev                        EQU        4                    ; Says whether there’s an RGB (0) or Monochrome (1) connection. 
  102. kUncertainConnection            EQU        5                    ; There may not be a display (no sense lines?). 
  103. kTaggingInfoNonStandard            EQU        6                    ; Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). 
  104. kReportsDDCConnection            EQU        7                    ; Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). 
  105. kHasDDCConnection                EQU        8                    ; Card has ddc connect now. 
  106.  
  107. ; csDisplayType values in VDDisplayConnectInfo 
  108. kUnknownConnect                    EQU        1                    ; Not sure how we’ll use this, but seems like a good idea. 
  109. kPanelConnect                    EQU        2                    ; For use with fixed-in-place LCD panels. 
  110. kPanelTFTConnect                EQU        2                    ; Alias for kPanelConnect 
  111. kFixedModeCRTConnect            EQU        3                    ;  For use with fixed-mode (i.e., very limited range) displays. 
  112. kMultiModeCRT1Connect            EQU        4                    ; 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe 
  113. kMultiModeCRT2Connect            EQU        5                    ; 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe 
  114. kMultiModeCRT3Connect            EQU        6                    ; 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain 
  115. kMultiModeCRT4Connect            EQU        7                    ; Expansion to large multi mode (not yet used) 
  116. kModelessConnect                EQU        8                    ; Expansion to modeless model (not yet used) 
  117. kFullPageConnect                EQU        9                    ; 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) 
  118. kVGAConnect                        EQU        10                    ; 640x480 VGA default -- question everything else 
  119. kNTSCConnect                    EQU        11                    ; NTSC ST (default), FF, STconv, FFconv 
  120. kPALConnect                        EQU        12                    ; PAL ST (default), FF, STconv, FFconv 
  121. kHRConnect                        EQU        13                    ; 640x400 (to get 8bpp in 256K case) and 640x480 (these two only) 
  122. kPanelFSTNConnect                EQU        14                    ; For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels 
  123.  
  124. ; csTimingFlags values in VDTimingInfoRec 
  125. kModeValid                        EQU        0                    ; Says that this mode should NOT be trimmed. 
  126. kModeSafe                        EQU        1                    ; This mode does not need confirmation 
  127. kModeDefault                    EQU        2                    ; This is the default mode for this type of connection 
  128. kModeShowNow                    EQU        3                    ; This mode should always be shown (even though it may require a confirm) 
  129. kModeNotResize                    EQU        4                    ; This mode should not be used to resize the display (eg. mode selects a different connector on card) 
  130. kModeRequiresPan                EQU        5                    ; This mode has more pixels than are actually displayed 
  131.  
  132. ; Control Codes 
  133. cscReset                        EQU        0
  134. cscKillIO                        EQU        1
  135. cscSetMode                        EQU        2
  136. cscSetEntries                    EQU        3
  137. cscSetGamma                        EQU        4
  138. cscGrayPage                        EQU        5
  139. cscGrayScreen                    EQU        5
  140. cscSetGray                        EQU        6
  141. cscSetInterrupt                    EQU        7
  142. cscDirectSetEntries                EQU        8
  143. cscSetDefaultMode                EQU        9
  144. cscSwitchMode                    EQU        10
  145. cscSetSync                        EQU        11
  146. cscSavePreferredConfiguration    EQU        16
  147. cscSetHardwareCursor            EQU        22
  148. cscDrawHardwareCursor            EQU        23
  149. cscSetConvolution                EQU        24
  150. cscUnusedCall                    EQU        127                    ; This call used to expend the scrn resource.  Its imbedded data contains more control info 
  151.  
  152. ; Status Codes 
  153. cscGetMode                        EQU        2
  154. cscGetEntries                    EQU        3
  155. cscGetPageCnt                    EQU        4
  156. cscGetPages                        EQU        4                    ; This is what C&D 2 calls it. 
  157. cscGetPageBase                    EQU        5
  158. cscGetBaseAddr                    EQU        5                    ; This is what C&D 2 calls it. 
  159. cscGetGray                        EQU        6
  160. cscGetInterrupt                    EQU        7
  161. cscGetGamma                        EQU        8
  162. cscGetDefaultMode                EQU        9
  163. cscGetCurMode                    EQU        10
  164. cscGetSync                        EQU        11
  165. cscGetConnection                EQU        12                    ; Return information about the connection to the display 
  166. cscGetModeTiming                EQU        13                    ; Return timing info for a mode 
  167. cscGetModeBaseAddress            EQU        14                    ; Return base address information about a particular mode 
  168. cscGetScanProc                    EQU        15                    ; QuickTime scan chasing routine 
  169. cscGetPreferredConfiguration    EQU        16
  170. cscGetNextResolution            EQU        17
  171. cscGetVideoParameters            EQU        18
  172. cscGetGammaList                    EQU        19                    ; Obsolete 
  173. cscGetGammaInfoList                EQU        20
  174. cscRetrieveGammaTable            EQU        21
  175. cscSupportsHardwareCursor        EQU        22
  176. cscGetConvolution                EQU        24
  177.  
  178. ; Bit definitions for the Get/Set Sync call
  179. kDisableHorizontalSyncBit        EQU        0
  180. kDisableVerticalSyncBit            EQU        1
  181. kDisableCompositeSyncBit        EQU        2
  182. kEnableSyncOnBlue                EQU        3
  183. kEnableSyncOnGreen                EQU        4
  184. kEnableSyncOnRed                EQU        5
  185. kNoSeparateSyncControlBit        EQU        6
  186. kHorizontalSyncMask                EQU        $01
  187. kVerticalSyncMask                EQU        $02
  188. kCompositeSyncMask                EQU        $04
  189. kDPMSSyncMask                    EQU        $7
  190. kSyncOnBlueMask                    EQU        $08
  191. kSyncOnGreenMask                EQU        $10
  192. kSyncOnRedMask                    EQU        $20
  193. kSyncOnMask                        EQU        $38
  194.  
  195. ;    Power Mode constants for translating DPMS modes to Get/SetSync calls.    
  196. kDPMSSyncOn                        EQU        0
  197. kDPMSSyncStandby                EQU        1
  198. kDPMSSyncSuspend                EQU        2
  199. kDPMSSyncOff                    EQU        7
  200.  
  201. ; Bit definitions for the Get/Set Convolution call
  202. kConvolved                        EQU        0
  203. kLiveVideoPassThru                EQU        1
  204. kConvolvedMask                    EQU        $01
  205. kLiveVideoPassThruMask            EQU        $02
  206.  
  207. VPBlock                 RECORD    0
  208. vpBaseOffset             ds.l   1        ; offset: $0 (0)        ;Offset to page zero of video RAM (From minorBaseOS).
  209. vpRowBytes                 ds.w   1        ; offset: $4 (4)        ;Width of each row of video memory.
  210. vpBounds                 ds     Rect    ; offset: $6 (6)        ;BoundsRect for the video display (gives dimensions).
  211. vpVersion                 ds.w   1        ; offset: $E (14)        ;PixelMap version number.
  212. vpPackType                 ds.w   1        ; offset: $10 (16)
  213. vpPackSize                 ds.l   1        ; offset: $12 (18)
  214. vpHRes                     ds.l   1        ; offset: $16 (22)        ;Horizontal resolution of the device (pixels per inch).
  215. vpVRes                     ds.l   1        ; offset: $1A (26)        ;Vertical resolution of the device (pixels per inch).
  216. vpPixelType                 ds.w   1        ; offset: $1E (30)        ;Defines the pixel type.
  217. vpPixelSize                 ds.w   1        ; offset: $20 (32)        ;Number of bits in pixel.
  218. vpCmpCount                 ds.w   1        ; offset: $22 (34)        ;Number of components in pixel.
  219. vpCmpSize                 ds.w   1        ; offset: $24 (36)        ;Number of bits per component
  220. vpPlaneBytes             ds.l   1        ; offset: $26 (38)        ;Offset from one plane to the next.
  221. sizeof                     EQU *            ; size:   $2A (42)
  222.                         ENDR
  223.  
  224. ; typedef struct VPBlock     VPBlock
  225. ; typedef VPBlock             *VPBlockPtr
  226. VDEntryRecord             RECORD    0
  227. csTable                     ds.l   1        ; offset: $0 (0)        ;(long) pointer to color table entry=value, r,g,b:INTEGER
  228. sizeof                     EQU *            ; size:   $4 (4)
  229.                         ENDR
  230.  
  231. ; typedef struct VDEntryRecord  VDEntryRecord
  232. ; typedef VDEntryRecord     *VDEntRecPtr
  233. ; Parm block for SetGray control call 
  234. VDGrayRecord             RECORD    0
  235. csMode                     ds.b   1        ; offset: $0 (0)        ;Same as GDDevType value (0=mono, 1=color)
  236. filler                     ds.b   1        ; offset: $1 (1)
  237. sizeof                     EQU *            ; size:   $2 (2)
  238.                         ENDR
  239.  
  240. ; typedef struct VDGrayRecord  VDGrayRecord
  241. ; typedef VDGrayRecord         *VDGrayPtr
  242. ; Parm block for SetEntries control call 
  243. VDSetEntryRecord         RECORD    0
  244. csTable                     ds.l   1        ; offset: $0 (0)        ;Pointer to an array of color specs
  245. csStart                     ds.w   1        ; offset: $4 (4)        ;Which spec in array to start with, or -1
  246. csCount                     ds.w   1        ; offset: $6 (6)        ;Number of color spec entries to set
  247. sizeof                     EQU *            ; size:   $8 (8)
  248.                         ENDR
  249.  
  250. ; typedef struct VDSetEntryRecord  VDSetEntryRecord
  251. ; typedef VDSetEntryRecord     *VDSetEntryPtr
  252. ; Parm block for SetGamma control call 
  253. VDGammaRecord             RECORD    0
  254. csGTable                 ds.l   1        ; offset: $0 (0)        ;pointer to gamma table
  255. sizeof                     EQU *            ; size:   $4 (4)
  256.                         ENDR
  257.  
  258. ; typedef struct VDGammaRecord  VDGammaRecord
  259. ; typedef VDGammaRecord     *VDGamRecPtr
  260. VDBaseAddressInfoRec     RECORD    0
  261. csDevData                 ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode 
  262. csDevBase                 ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) base address of the mode 
  263. csModeReserved             ds.w   1        ; offset: $8 (8)        ; INTEGER - (short) will some day be the depth 
  264. csModeBase                 ds.l   1        ; offset: $A (10)        ; LONGINT - (long) reserved 
  265. sizeof                     EQU *            ; size:   $E (14)
  266.                         ENDR
  267.  
  268. ; typedef struct VDBaseAddressInfoRec  VDBaseAddressInfoRec, *VDBaseAddressInfoPtr
  269. VDSwitchInfoRec         RECORD    0
  270. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode depth
  271. csData                     ds.l   1        ; offset: $2 (2)        ;(long) functional sResource of mode
  272. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  273. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page (return value)
  274. csReserved                 ds.l   1        ; offset: $C (12)        ;(long) Reserved (set to 0) 
  275. sizeof                     EQU *            ; size:   $10 (16)
  276.                         ENDR
  277.  
  278. ; typedef struct VDSwitchInfoRec  VDSwitchInfoRec
  279. ; typedef VDSwitchInfoRec     *VDSwitchInfoPtr
  280. VDTimingInfoRec         RECORD    0
  281. csTimingMode             ds.l   1        ; offset: $0 (0)        ; LONGINT - (long) timing mode (a la InitGDevice) 
  282. csTimingReserved         ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) reserved 
  283. csTimingFormat             ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) what format is the timing info 
  284. csTimingData             ds.l   1        ; offset: $C (12)        ; LONGINT - (long) data supplied by driver 
  285. csTimingFlags             ds.l   1        ; offset: $10 (16)        ; LONGINT - (long) mode within device 
  286. sizeof                     EQU *            ; size:   $14 (20)
  287.                         ENDR
  288.  
  289. ; typedef struct VDTimingInfoRec  VDTimingInfoRec
  290. ; typedef VDTimingInfoRec     *VDTimingInfoPtr
  291. VDDisplayConnectInfoRec RECORD    0
  292. csDisplayType             ds.w   1        ; offset: $0 (0)        ; INTEGER - (word) Type of display connected 
  293. csConnectTaggedType         ds.b   1        ; offset: $2 (2)        ; BYTE - type of tagging 
  294. csConnectTaggedData         ds.b   1        ; offset: $3 (3)        ; BYTE - tagging data 
  295. csConnectFlags             ds.l   1        ; offset: $4 (4)        ; LONGINT - (long) tell us about the connection 
  296. csDisplayComponent         ds.l   1        ; offset: $8 (8)        ; LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) 
  297. csConnectReserved         ds.l   1        ; offset: $C (12)        ; LONGINT - (long) reserved 
  298. sizeof                     EQU *            ; size:   $10 (16)
  299.                         ENDR
  300.  
  301. ; typedef struct VDDisplayConnectInfoRec  VDDisplayConnectInfoRec
  302. ; typedef VDDisplayConnectInfoRec  *VDDisplayConnectInfoPtr
  303. ; RawSenseCode
  304. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  305. ;    for the possible raw sense code values when 'standard' sense code hardware is implemented.
  306. ;
  307. ;    For 'standard' sense code hardware, the raw sense is obtained as follows:
  308. ;        • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  309. ;        • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  310. ;
  311. ;    IMPORTANT Note: 
  312. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  313. ;    are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  314. ;
  315. ;
  316. ; typedef unsigned char     RawSenseCode
  317.  
  318. kRSCZero                        EQU        0
  319. kRSCOne                            EQU        1
  320. kRSCTwo                            EQU        2
  321. kRSCThree                        EQU        3
  322. kRSCFour                        EQU        4
  323. kRSCFive                        EQU        5
  324. kRSCSix                            EQU        6
  325. kRSCSeven                        EQU        7
  326.  
  327. ; ExtendedSenseCode
  328. ;    This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  329. ;    for the values which are possible when the extended sense algorithm is applied to hardware
  330. ;    which implements 'standard' sense code hardware.
  331. ;
  332. ;     For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  333. ;    (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  334. ;        • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  335. ;        • Drive sense line 'B' low and read the values of 'A' and 'C'.
  336. ;        • Drive sense line 'C' low and read the values of 'A' and 'B'.
  337. ;
  338. ;    In this way, a six-bit number of the form BC/AC/AB is generated. 
  339. ;
  340. ;    IMPORTANT Note: 
  341. ;    When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  342. ;    are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  343. ;
  344. ;
  345. ; typedef unsigned char     ExtendedSenseCode
  346.  
  347. kESCZero21Inch                    EQU        $00                    ; 21" RGB                                 
  348. kESCOnePortraitMono                EQU        $14                    ; Portrait Monochrome                     
  349. kESCTwo12Inch                    EQU        $21                    ; 12" RGB                                
  350. kESCThree21InchRadius            EQU        $31                    ; 21" RGB (Radius)                        
  351. kESCThree21InchMonoRadius        EQU        $34                    ; 21" Monochrome (Radius)                 
  352. kESCThree21InchMono                EQU        $35                    ; 21" Monochrome                        
  353. kESCFourNTSC                    EQU        $0A                    ; NTSC                                 
  354. kESCFivePortrait                EQU        $1E                    ; Portrait RGB                         
  355. kESCSixMSB1                        EQU        $03                    ; MultiScan Band-1 (12" thru 1Six")    
  356. kESCSixMSB2                        EQU        $0B                    ; MultiScan Band-2 (13" thru 19")        
  357. kESCSixMSB3                        EQU        $23                    ; MultiScan Band-3 (13" thru 21")        
  358. kESCSixStandard                    EQU        $2B                    ; 13"/14" RGB or 12" Monochrome        
  359. kESCSevenPAL                    EQU        $00                    ; PAL                                    
  360. kESCSevenNTSC                    EQU        $14                    ; NTSC                                 
  361. kESCSevenVGA                    EQU        $17                    ; VGA                                     
  362. kESCSeven16Inch                    EQU        $2D                    ; 16" RGB (GoldFish)                      
  363. kESCSevenPALAlternate            EQU        $30                    ; PAL (Alternate)                         
  364. kESCSeven19Inch                    EQU        $3A                    ; Third-Party 19”                        
  365. kESCSevenNoDisplay                EQU        $3F                    ; No display connected                 
  366.  
  367. VDPageInfo                 RECORD    0
  368. csMode                     ds.w   1        ; offset: $0 (0)        ;(word) mode within device
  369. csData                     ds.l   1        ; offset: $2 (2)        ;(long) data supplied by driver
  370. csPage                     ds.w   1        ; offset: $6 (6)        ;(word) page to switch in
  371. csBaseAddr                 ds.l   1        ; offset: $8 (8)        ;(long) base address of page
  372. sizeof                     EQU *            ; size:   $C (12)
  373.                         ENDR
  374.  
  375. ; typedef struct VDPageInfo  VDPageInfo
  376. ; typedef VDPageInfo         *VDPgInfoPtr
  377. VDSizeInfo                 RECORD    0
  378. csHSize                     ds.w   1        ; offset: $0 (0)        ;(word) desired/returned h size
  379. csHPos                     ds.w   1        ; offset: $2 (2)        ;(word) desired/returned h position
  380. csVSize                     ds.w   1        ; offset: $4 (4)        ;(word) desired/returned v size
  381. csVPos                     ds.w   1        ; offset: $6 (6)        ;(word) desired/returned v position
  382. sizeof                     EQU *            ; size:   $8 (8)
  383.                         ENDR
  384.  
  385. ; typedef struct VDSizeInfo  VDSizeInfo
  386. ; typedef VDSizeInfo         *VDSzInfoPtr
  387. VDSettings                 RECORD    0
  388. csParamCnt                 ds.w   1        ; offset: $0 (0)        ;(word) number of params
  389. csBrightMax                 ds.w   1        ; offset: $2 (2)        ;(word) max brightness
  390. csBrightDef                 ds.w   1        ; offset: $4 (4)        ;(word) default brightness
  391. csBrightVal                 ds.w   1        ; offset: $6 (6)        ;(word) current brightness
  392. csCntrstMax                 ds.w   1        ; offset: $8 (8)        ;(word) max contrast
  393. csCntrstDef                 ds.w   1        ; offset: $A (10)        ;(word) default contrast
  394. csCntrstVal                 ds.w   1        ; offset: $C (12)        ;(word) current contrast
  395. csTintMax                 ds.w   1        ; offset: $E (14)        ;(word) max tint
  396. csTintDef                 ds.w   1        ; offset: $10 (16)        ;(word) default tint
  397. csTintVal                 ds.w   1        ; offset: $12 (18)        ;(word) current tint
  398. csHueMax                 ds.w   1        ; offset: $14 (20)        ;(word) max hue
  399. csHueDef                 ds.w   1        ; offset: $16 (22)        ;(word) default hue
  400. csHueVal                 ds.w   1        ; offset: $18 (24)        ;(word) current hue
  401. csHorizDef                 ds.w   1        ; offset: $1A (26)        ;(word) default horizontal
  402. csHorizVal                 ds.w   1        ; offset: $1C (28)        ;(word) current horizontal
  403. csHorizMax                 ds.w   1        ; offset: $1E (30)        ;(word) max horizontal
  404. csVertDef                 ds.w   1        ; offset: $20 (32)        ;(word) default vertical
  405. csVertVal                 ds.w   1        ; offset: $22 (34)        ;(word) current vertical
  406. csVertMax                 ds.w   1        ; offset: $24 (36)        ;(word) max vertical
  407. sizeof                     EQU *            ; size:   $26 (38)
  408.                         ENDR
  409.  
  410. ; typedef struct VDSettings  VDSettings
  411. ; typedef VDSettings         *VDSettingsPtr
  412. ; typedef unsigned long     DisplayModeID
  413. ; typedef unsigned long     VideoDeviceType
  414. ; typedef unsigned long     GammaTableID
  415. ; DepthMode
  416. ;    This abstract data type is used to to reference RELATIVE pixel depths.
  417. ;    Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  418. ;
  419. ;    Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  420. ;    graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  421. ;    hardware, 'kDepthMode1' may represent 8BPP.
  422. ;
  423. ;    DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  424. ;    behave as expected.  The values of the constants which comprise the set are such
  425. ;    that 'kDepthMode4 < kDepthMode6' behaves as expected.
  426. ;
  427. ; typedef unsigned short     DepthMode
  428.  
  429. kDepthMode1                        EQU        128
  430. kDepthMode2                        EQU        129
  431. kDepthMode3                        EQU        130
  432. kDepthMode4                        EQU        131
  433. kDepthMode5                        EQU        132
  434. kDepthMode6                        EQU        133
  435.  
  436. kFirstDepthMode                    EQU        128                    ; These constants are obsolete, and just included    
  437. kSecondDepthMode                EQU        129                    ; for clients that have converted to the above        
  438. kThirdDepthMode                    EQU        130                    ; kDepthModeXXX constants.                            
  439. kFourthDepthMode                EQU        131
  440. kFifthDepthMode                    EQU        132
  441. kSixthDepthMode                    EQU        133
  442.  
  443. VDResolutionInfoRec     RECORD    0
  444. csPreviousDisplayModeID     ds.l   1        ; offset: $0 (0)        ; ID of the previous resolution in a chain 
  445. csDisplayModeID             ds.l   1        ; offset: $4 (4)        ; ID of the next resolution 
  446. csHorizontalPixels         ds.l   1        ; offset: $8 (8)        ; # of pixels in a horizontal line 
  447. csVerticalLines             ds.l   1        ; offset: $C (12)        ; # of lines in a screen 
  448. csRefreshRate             ds.l   1        ; offset: $10 (16)        ; Vertical Refresh Rate in Hz 
  449. csMaxDepthMode             ds.w   1        ; offset: $14 (20)        ; 0x80-based number representing max bit depth 
  450. csReserved                 ds.l   1        ; offset: $16 (22)        ; Reserved 
  451. csReserved1                 ds.l   1        ; offset: $1A (26)        ; Reserved 
  452. sizeof                     EQU *            ; size:   $1E (30)
  453.                         ENDR
  454.  
  455. ; typedef struct VDResolutionInfoRec  VDResolutionInfoRec
  456. ; typedef VDResolutionInfoRec  *VDResolutionInfoPtr
  457. VDVideoParametersInfoRec RECORD    0
  458. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  459. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  460. csVPBlockPtr             ds.l   1        ; offset: $6 (6)        ; Pointer to a video parameter block 
  461. csPageCount                 ds.l   1        ; offset: $A (10)        ; Number of pages supported by the resolution 
  462. csDeviceType             ds.l   1        ; offset: $E (14)        ; Device Type:  Direct, Fixed or CLUT; 
  463. csReserved                 ds.l   1        ; offset: $12 (18)        ; Reserved 
  464. sizeof                     EQU *            ; size:   $16 (22)
  465.                         ENDR
  466.  
  467. ; typedef struct VDVideoParametersInfoRec  VDVideoParametersInfoRec
  468. ; typedef VDVideoParametersInfoRec  *VDVideoParametersInfoPtr
  469. VDGammaInfoRec             RECORD    0
  470. csLastGammaID             ds.l   1        ; offset: $0 (0)        ; the ID of the previous gamma table 
  471. csNextGammaID             ds.l   1        ; offset: $4 (4)        ; the ID of the next gamma table 
  472. csGammaPtr                 ds.l   1        ; offset: $8 (8)        ; Ptr to a gamma table data 
  473. csReserved                 ds.l   1        ; offset: $C (12)        ; Reserved 
  474. sizeof                     EQU *            ; size:   $10 (16)
  475.                         ENDR
  476.  
  477. ; typedef struct VDGammaInfoRec  VDGammaInfoRec
  478. ; typedef VDGammaInfoRec     *VDGammaInfoPtr
  479. VDGetGammaListRec         RECORD    0
  480. csPreviousGammaTableID     ds.l   1        ; offset: $0 (0)        ; ID of the previous gamma table 
  481. csGammaTableID             ds.l   1        ; offset: $4 (4)        ; ID of the gamma table following csPreviousDisplayModeID 
  482. csGammaTableSize         ds.l   1        ; offset: $8 (8)        ; Size of the gamma table in bytes 
  483. csGammaTableName         ds.l   1        ; offset: $C (12)        ; Gamma table name (c-string) 
  484. sizeof                     EQU *            ; size:   $10 (16)
  485.                         ENDR
  486.  
  487. ; typedef struct VDGetGammaListRec  VDGetGammaListRec
  488. ; typedef VDGetGammaListRec  *VDGetGammaListPtr
  489. VDRetrieveGammaRec         RECORD    0
  490. csGammaTableID             ds.l   1        ; offset: $0 (0)        ; ID of gamma table to retrieve 
  491. csGammaTablePtr             ds.l   1        ; offset: $4 (4)        ; Location to copy desired gamma to 
  492. sizeof                     EQU *            ; size:   $8 (8)
  493.                         ENDR
  494.  
  495. ; typedef struct VDRetrieveGammaRec  VDRetrieveGammaRec
  496. ; typedef VDRetrieveGammaRec  *VDRetrieveGammaPtr
  497. VDSetHardwareCursorRec     RECORD    0
  498. csCursorRef                 ds.l   1        ; offset: $0 (0)
  499. sizeof                     EQU *            ; size:   $4 (4)
  500.                         ENDR
  501.  
  502. ; typedef struct VDSetHardwareCursorRec  VDSetHardwareCursorRec
  503. ; typedef VDSetHardwareCursorRec  *VDSetHardwareCursorPtr
  504. VDDrawHardwareCursorRec RECORD    0
  505. csCursorX                 ds.l   1        ; offset: $0 (0)
  506. csCursorY                 ds.l   1        ; offset: $4 (4)
  507. csCursorVisible             ds.l   1        ; offset: $8 (8)
  508. sizeof                     EQU *            ; size:   $C (12)
  509.                         ENDR
  510.  
  511. ; typedef struct VDDrawHardwareCursorRec  VDDrawHardwareCursorRec
  512. ; typedef VDDrawHardwareCursorRec  *VDDrawHardwareCursorPtr
  513. VDSupportsHardwareCursorRec RECORD    0
  514. csSupportsHardwareCursor ds.b   1        ; offset: $0 (0)        ; True if hardware cursor is supported 
  515. filler                     ds.b   1        ; offset: $1 (1)
  516. sizeof                     EQU *            ; size:   $2 (2)
  517.                         ENDR
  518.  
  519. ; typedef struct VDSupportsHardwareCursorRec  VDSupportsHardwareCursorRec
  520. ; typedef VDSupportsHardwareCursorRec  *VDSupportsHardwareCursorPtr
  521. VDDefMode                 RECORD    0
  522. csID                     ds.b   1        ; offset: $0 (0)
  523. filler                     ds.b   1        ; offset: $1 (1)
  524. sizeof                     EQU *            ; size:   $2 (2)
  525.                         ENDR
  526.  
  527. ; typedef struct VDDefMode     VDDefMode
  528. ; typedef VDDefMode         *VDDefModePtr
  529. VDSyncInfoRec             RECORD    0
  530. csMode                     ds.b   1        ; offset: $0 (0)
  531. csFlags                     ds.b   1        ; offset: $1 (1)
  532. sizeof                     EQU *            ; size:   $2 (2)
  533.                         ENDR
  534.  
  535. ; typedef struct VDSyncInfoRec  VDSyncInfoRec
  536. ; typedef VDSyncInfoRec     *VDSyncInfoPtr
  537. VDConvolutionInfoRec     RECORD    0
  538. csDisplayModeID             ds.l   1        ; offset: $0 (0)        ; the ID of the resolution we want info on 
  539. csDepthMode                 ds.w   1        ; offset: $4 (4)        ; The bit depth we want the info on (0x80 based) 
  540. csPage                     ds.l   1        ; offset: $6 (6)
  541. csFlags                     ds.l   1        ; offset: $A (10)
  542. csReserved                 ds.l   1        ; offset: $E (14)
  543. sizeof                     EQU *            ; size:   $12 (18)
  544.                         ENDR
  545.  
  546. ; typedef struct VDConvolutionInfoRec  VDConvolutionInfoRec
  547. ; typedef VDConvolutionInfoRec  *VDConvolutionInfoPtr
  548.     ENDIF ; __VIDEO__
  549.